<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body padding-left-40">
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">班级</span>
                <select class="layui-select" required name="class_id" id="">
                    <option value="0">请选择</option>
                    {foreach $memberclass as $item}
                    {if isset($vo.class_id) and $vo.class_id eq $item.id}
                    <option selected value="{$item.id}">{$item.name}</option>
                    {else}
                    <option value="{$item.id}">{$item.name}</option>
                    {/if}
                    {/foreach}
                </select>
            </label>
        </div>
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">学员学号</span>
                <span class="color-desc margin-left-5">ClassNo</span>
                <input name="class_no" value='{$vo.class_no|default=""}' required pattern="^.{2,}$" placeholder="请输入学员学号" class="layui-input">
            </label>
        </div>
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">学员姓名</span>
                <span class="color-desc margin-left-5">RealName</span>
                <input name="real_name" value='{$vo.real_name|default=""}' required pattern="^.{2,}$" placeholder="请输入学员姓名" class="layui-input">
            </label>
        </div>
        <!-- <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">用户头像</span>
                <span class="color-desc margin-left-5">HeadImg</span>
                <div>
                    <input name="headimg" type="hidden" value="{$vo.headimg|default=''}">
                    <script>$('[name="headimg"]').uploadOneImage()</script>
                </div>
            </label>
            <p class="color-desc">用户显示头像，请上传1:1比例图片</p>
        </div> -->
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">用户联系手机</span>
                <span class="color-desc margin-left-5">Phone</span>
                <input type="tel" maxlength="11" autocomplete="off" autofocus name="phone" value='{$vo.phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入正确的手机号码" class="layui-input">
            </label>
            <p class="color-desc">可选，用户联系手机号码，需要填写正确的格式</p>
        </div>
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">联系电子邮箱</span>
                <span class="color-desc margin-left-5">Email</span>
                <input name="mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
            </label>
            <p class="color-desc">可选，用户联系电子邮箱，需要填写正确的格式</p>
        </div>
    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>

<script>
    window.form.render();
</script>
